package de.koller.worlders.engine.tiles.light;

import de.koller.oceanFramework.util.ColorIntUtil;

public class LightSource {
	final int x;
	final int y;
	int light;

	public LightSource( int x, int y, int light ) {
		this.x = x;
		this.y = y;
		this.setLight( light );
	}

	public int getLight() {
		return light;
	}

	public void setLight( int light ) {
		this.light = light;
		if( ColorIntUtil.getAValue( light ) != 0xff )
			throw new IllegalArgumentException( "Light may not have an alpha-value other than 0xff!" );
	}

	public int getX() {
		return x;
	}

	public int getY() {
		return y;
	}
	
}
